import request from '@/utils/request'

// 查询规格类型列表
export function listSpecType(query) {
  return request({
    url: '/product/specType/list',
    method: 'get',
    params: query
  })
}

// 查询规格类型详细
export function getSpecType(id) {
  return request({
    url: '/product/specType/' + id,
    method: 'get'
  })
}

// 新增规格类型
export function addSpecType(data) {
  return request({
    url: '/product/specType',
    method: 'post',
    data: data
  })
}

// 修改规格类型
export function updateSpecType(data) {
  return request({
    url: '/product/specType',
    method: 'put',
    data: data
  })
}

// 删除规格类型
export function delSpecType(id) {
  return request({
    url: '/product/specType/' + id,
    method: 'delete'
  })
}
